﻿/****************************************************************************************************
 * @authors: Paweł Lew-Kiedrowski & Mateusz Łajming
 * based on Google Street View viewer for the Oculus Rift by troffmo5 http://github.com/troffmo5
 *
 * VIRTUAL WALK Parameters
 ****************************************************************************************************/

/* CONST parameters */
var MOUSE_SPEED = 0.005;
var QUALITY = 3;
var DEFAULT_LOCATION = { lat: 54.372888, lng: 18.616997 };
var WORLD_FACTOR = 1.0;
var NAV_DELTA = 45; // delta between curr heading and place heading should be less than NAV_DELTA
var DEFAULT_WEBSOCKET_ADDRESS = "ws://127.0.0.1:1981";
var OculusRift = {
    // Parameters from the Oculus Rift DK1
    hResolution: 1280,
    vResolution: 800,
    hScreenSize: 0.14976,
    vScreenSize: 0.0936,
    interpupillaryDistance: 0.064,
    lensSeparationDistance: 0.064,
    eyeToScreenDistance: 0.041,
    distortionK: [1.0, 0.22, 0.24, 0.0],
    chromaAbParameter: [0.996, -0.004, 1.014, 0.0]
};

/* Global parameters */
var currHeading = 90;
var centerHeading = 0;
var HMDRotation = new THREE.Quaternion();
var BaseRotation = new THREE.Quaternion();
var BaseRotationEuler = new THREE.Vector3();
var HMDRotationEuler = new THREE.Vector3();
var headingVector = new THREE.Vector3();

var notifyOptions = 
{
    // whether to hide the notification on click
    clickToHide: true,
    // whether to auto-hide the notification
    autoHide: true,
    // if autoHide, hide after milliseconds
    autoHideDelay: 2500,
    // show the arrow pointing at the element
    arrowShow: false,
    // default positions
    elementPosition: 'top center',
    globalPosition: 'top right',
    // default style
    style: 'bootstrap',
    // default class (string or [string])
    className: 'success',
    // show animation
    showAnimation: 'slideDown',
    // show animation duration
    showDuration: 400,
    // hide animation
    hideAnimation: 'slideUp',
    // hide animation duration
    hideDuration: 200,
    // padding between element and notification
    gap: 2
}